<?php //echo $this->javascript->link('jquery-1.4.2.min');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php __('DTC'); ?>
		<?php echo $title_for_layout; ?>
	</title>
		<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
	<?php
		echo $this->Html->meta('icon');

		echo $this->Html->css('cake.generic');

		echo $scripts_for_layout;

		//$userId = $this->Auth->user('id');
		$user = $this->Session->read('Auth.User');
		$_SESSION['ok'] = "logueado";
		if(!empty($user))
		{
		    echo 'Hello, ' . $user['username'];
		}
	?>

</head>
<body>

	
	<div id="container">
		<div id="header">
			<div id="container">
		<div id="header">
			
			<div id="menu">
				<?php if ($user['role_id']=='1'){?>
				<ul>
					<li><?php echo $this->Html->link('Home', array('controller'=>'previews', 'action'=>'index')); ?></li>								
					<li><?php echo $this->Html->link('Usuarios', array('controller'=>'users', 'action'=>'index')); ?></li>					
					<li><?php echo $this->Html->link('Instituciones', array('controller'=>'institutions', 'action'=>'index')); ?></li> 				
					<!--<li><?php echo $this->Html->link('Módulos', array('controller'=>'modules', 'action'=>'index')); ?></li>					 					
					<li><?php echo $this->Html->link('Preguntas', array('controller'=>'questions', 'action'=>'index')); ?></li>
					<li><?php echo $this->Html->link('Respuestas Prueba', array('controller'=>'quizzes', 'action'=>'index')); ?></li> -->
					<li><?php echo $this->Html->link('Proyectos', array('controller'=>'projects', 'action'=>'index')); ?></h1></li>
					<li><?php echo $this->Html->link('Avances', array('controller'=>'previews', 'action'=>'index')); ?></li>					
					<li><?php echo $this->Html->link('Evaluaciones', array('controller'=>'evaluations', 'action'=>'index')); ?></li>											
					<li><?php echo $this->Html->link('Cerrar sesión', array('controller'=>'users', 'action'=>'logout')); ?></li>
				</ul><?php } ?>

				<?php if ($user['role_id']=='3') {?>
				<ul>
					<li><?php echo $this->Html->link('Home', array('controller'=>'fronts', 'action'=>'indexAlumno')); ?></li>
					
					
				<li><?php echo $this->Html->link('Avances', array('controller'=>'previews', 'action'=>'index')); ?></li>					
					
					<li><?php echo $this->Html->link('Cerrar sesión', array('controller'=>'users', 'action'=>'logout')); ?></li>
				</ul><?php } ?>
				<?php if ($user['role_id']=='4') {?>
				<ul>
				<li><?php echo $this->Html->link('Notas', array('controller'=>'evaluations', 'action'=>'indexNotas')); ?></li>						
				<li><?php echo $this->Html->link('Avances', array('controller'=>'previews', 'action'=>'index')); ?></li>					
				<li><?php echo $this->Html->link('Cerrar sesión', array('controller'=>'users', 'action'=>'logout')); ?></li>
				</ul><?php } ?>

				<?php if ($user['role_id']=='6') {?>
				<ul>
					<li><?php echo $this->Html->link('Home', array('controller'=>'fronts', 'action'=>'indexEvaluador')); ?></li>
				
					<li><?php echo $this->Html->link('Evaluaciones', array('controller'=>'evaluations', 'action'=>'index')); ?></li>
					<li><?php echo $this->Html->link('Cerrar sesión', array('controller'=>'users', 'action'=>'logout')); ?></li>
				</ul><?php } ?>


				
			</div>
			
		</div>
		</div>
		<div id="content">

			<?php echo $this->Session->flash(); ?>

			<?php echo $content_for_layout; ?>

		</div>
		<div id="footer">
			
		</div>
	</div>
	
	<!--<?php echo $this->Html->image('logo_dtc.png');?>-->
</body>
</html>
